package servlet_item;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import factory.ItemManagerFactory;
import pojo.Item;
import service.ItemManager;

public class findServlet extends HttpServlet{
	private static final long serialVersionUID = 1L;
    private ItemManager im=ItemManagerFactory.getItemManagerInstance(); 
	public findServlet() {
		super();
		// TODO Auto-generated constructor stub
	}

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

		int id =Integer.parseInt(req.getParameter("id"));
		Item item=im.lookItem(id);
		System.out.println(item.getItemName());
	}

}
